package com.miya.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_user")
public class User extends BaseEntity implements Serializable {
    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "`password`")
    private String password;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 性别: 0-保密; 1-男; 2-女
     */
    @TableField(value = "gender")
    private Integer gender;

    /**
     * 状态: 1-正常; 2-锁定; 3-过期; 4-禁用
     */
    @TableField(value = "`status`")
    private Integer status;

    /**
     * 最后一次登录时间
     */
    @TableField(value = "last_login_time")
    private LocalDateTime lastLoginTime;

    private static final long serialVersionUID = 1L;
}